API: remove begin/end_direct_draw functions
authorBenjamin Otte <otte@redhat.com>
Thu, 22 Jul 2010 01:25:11 +0000 (03:25 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 10 Aug 2010 19:02:29 +0000 (21:02 +0200)
They're not needed without GdkGCs.

FIXME: This breaks the win32 XP theme. Someone gotta fix it.

gdk/gdk.symbols
gdk/gdkinternals.h
gdk/gdkwindow.c
gdk/win32/gdkwin32.h
gdk/win32/gdkwindow-win32.c

index e123ab02e58ccbb80ef9451df31985dd1b75f576..def0a44d776bbe16ea5d10578487547b90ca7a28 100644 (file)
@@ -1028,8 +1028,6 @@ gdk_window_destroy_notify
 #if IN_HEADER(__GDK_WIN32_H__)
 #if IN_FILE(__GDK_WINDOW_WIN32_C__)
 gdk_win32_window_is_win32
-gdk_win32_begin_direct_draw_libgtk_only
-gdk_win32_end_direct_draw_libgtk_only
 #endif
 #endif
 
index 33e4958e9e1e8a8236493b1c578803df30981aa4..cfe0fb244ae8f0f17302ecbda3c247b94a49f5f4 100644 (file)
@@ -388,13 +388,6 @@ void       _gdk_gc_set_clip_region_internal (GdkGC     *gc,
                                             gboolean reset_origin);
 GdkSubwindowMode _gdk_gc_get_subwindow (GdkGC *gc);
 
-GdkDrawable *_gdk_drawable_begin_direct_draw (GdkDrawable *drawable,
-                                             GdkGC *gc,
-                                             gpointer *priv_data,
-                                             gint *x_offset_out,
-                                             gint *y_offset_out);
-void         _gdk_drawable_end_direct_draw (gpointer priv_data);
-
 
 /*****************************************
  * Interfaces provided by windowing code *
index 75c86d4be6d4e833c5e9a41aab424e19c42c9c31..73feaa50e96d5a18ed0f632d534532667a7f86f4 100644 (file)
@@ -3698,130 +3698,6 @@ start_draw_helper (GdkDrawable *drawable,
   return impl;
 }
 
-#define BEGIN_DRAW                                     \
-  {                                                    \
-    GdkDrawable *impl;                                 \
-    gint x_offset, y_offset;                           \
-    gint old_clip_x = gc->clip_x_origin;               \
-    gint old_clip_y = gc->clip_y_origin;               \
-    gint old_ts_x = gc->ts_x_origin;                   \
-    gint old_ts_y = gc->ts_y_origin;                   \
-    impl = start_draw_helper (drawable, gc,            \
-                             &x_offset, &y_offset);
-
-#define END_DRAW                                           \
-    if (x_offset != 0 || y_offset != 0)                            \
-     {                                                      \
-       gdk_gc_set_clip_origin (gc, old_clip_x, old_clip_y); \
-       gdk_gc_set_ts_origin (gc, old_ts_x, old_ts_y);       \
-     }                                                      \
-  }
-
-#define BEGIN_DRAW_MACRO \
-  {
-
-#define END_DRAW_MACRO \
-  }
-
-typedef struct
-{
-  GdkDrawable *drawable;
-  GdkGC *gc;
-
-  gint x_offset;
-  gint y_offset;
-
-  gint clip_x;
-  gint clip_y;
-  gint ts_x;
-  gint ts_y;
-} DirectDrawInfo;
-
-GdkDrawable *
-_gdk_drawable_begin_direct_draw (GdkDrawable *drawable,
-                                GdkGC *gc,
-                                gpointer *priv_data,
-                                gint *x_offset_out,
-                                gint *y_offset_out)
-{
-  g_return_val_if_fail (priv_data != NULL, NULL);
-
-  GdkDrawable *out_impl = NULL;
-
-  *priv_data = NULL;
-
-  if (GDK_IS_PIXMAP (drawable))
-    {
-      /* We bypass the GdkPixmap functions, so do this ourself */
-      _gdk_gc_remove_drawable_clip (gc);
-
-      out_impl = drawable;
-
-      *x_offset_out = 0;
-      *y_offset_out = 0;
-    }
-  else
-    {
-      if (GDK_WINDOW_DESTROYED (drawable))
-        return NULL;
-
-      BEGIN_DRAW;
-
-      if (impl == NULL)
-        return NULL;
-
-      out_impl = impl;
-
-      *x_offset_out = x_offset;
-      *y_offset_out = y_offset;
-
-      DirectDrawInfo *priv = g_new (DirectDrawInfo, 1);
-
-      priv->drawable = impl;
-      priv->gc = gc;
-
-      priv->x_offset = x_offset;
-      priv->y_offset = y_offset;
-      priv->clip_x = old_clip_x;
-      priv->clip_y = old_clip_y;
-      priv->ts_x = old_ts_x;
-      priv->ts_y = old_ts_y;
-
-      *priv_data = (gpointer) priv;
-
-      END_DRAW_MACRO;
-    }
-
-  return out_impl;
-}
-
-void
-_gdk_drawable_end_direct_draw (gpointer priv_data)
-{
-  /* Its a GdkPixmap or the call to _gdk_drawable_begin_direct_draw failed. */
-  if (priv_data == NULL)
-    return;
-
-  DirectDrawInfo *priv = priv_data;
-  GdkGC *gc = priv->gc;
-
-  /* This is only for GdkWindows - if GdkPixmaps need any handling here in
-   * the future, then we should keep track of what type of drawable it is in
-   * DirectDrawInfo. */
-  BEGIN_DRAW_MACRO;
-
-  gint x_offset = priv->x_offset;
-  gint y_offset = priv->y_offset;
-  gint old_clip_x = priv->clip_x;
-  gint old_clip_y = priv->clip_y;
-  gint old_ts_x = priv->ts_x;
-  gint old_ts_y = priv->ts_y;
-
-  END_DRAW;
-
-  g_free (priv_data);
-}
-
 static GdkGC *
 gdk_window_create_gc (GdkDrawable     *drawable,
                      GdkGCValues     *values,
index 5f769b0ae53614e7a1448d2edaacbc5d85f0f2cb..fef1400996a65594aafb39c8b363dc48b647ae29 100644 (file)
@@ -108,13 +108,6 @@ GdkPixbuf    *gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon);
 HICON         gdk_win32_pixbuf_to_hicon_libgtk_only (GdkPixbuf *pixbuf);
 void          gdk_win32_set_modal_dialog_libgtk_only (HWND window);
 
-GdkDrawable  *gdk_win32_begin_direct_draw_libgtk_only (GdkDrawable *drawable,
-                                                      GdkGC *gc,
-                                                      gpointer *priv_data,
-                                                      gint *x_offset_out,
-                                                      gint *y_offset_out);
-void          gdk_win32_end_direct_draw_libgtk_only (gpointer priv_data);
-
 
 G_END_DECLS
 
index 3d5e4e725b4900b60b85614b4a52f9cfbb1f100d..d93e57eec50f7c41c3ff3c7e752ea50c85548ba4 100644 (file)
@@ -3386,26 +3386,3 @@ gdk_win32_window_is_win32 (GdkWindow *window)
   return GDK_WINDOW_IS_WIN32 (window);
 }
 
-GdkDrawable *
-gdk_win32_begin_direct_draw_libgtk_only (GdkDrawable *drawable,
-                                        GdkGC *gc,
-                                        gpointer *priv_data,
-                                        gint *x_offset_out,
-                                        gint *y_offset_out)
-{
-  GdkDrawable *impl;
-
-  impl = _gdk_drawable_begin_direct_draw (drawable,
-                                         gc,
-                                         priv_data,
-                                         x_offset_out,
-                                         y_offset_out);
-
-  return impl;
-}
-
-void
-gdk_win32_end_direct_draw_libgtk_only (gpointer priv_data)
-{
-  _gdk_drawable_end_direct_draw (priv_data);
-}